set(project_name axistags)

find_package(Qt5 COMPONENTS Widgets Core Gui Sql Svg Qml QUick PrintSupport REQUIRED)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

file(GLOB SOURCES
    "*.cpp"
    "*.c"
    "*.hpp"
    "*.cxx"
    )

file(GLOB HEADERS
    "*.h"
    "*.hxx"
    )

file(GLOB UI_FILES
    "*.ui"
    )

file(GLOB UI_QRC
    "*.qrc"
    )

qt5_wrap_ui(wrap_ui_file ${UI_FILES})
qt5_add_resources(QRC_FILES ${UI_QRC})

add_executable(${project_name}
WIN32
    ${SOURCES} 
    ${HEADERS} 
    ${UI_FILES} 
    ${UI_QRC}
)

# 链接Qt库
target_link_libraries(${project_name} 
	Qt5::Widgets
	Qt5::Core
    Qt5::PrintSupport
    qcustomplot
)
link_directories (${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG})
link_directories (${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE})